package lapsnake.model.expr;

import lapsnake.model.*;
import lapsnake.model.data.*;
import lapsnake.py.ast.ASTHelperFactory; import java.beans.PropertyVetoException;

import org.python.antlr.ast.*;

/**Wrapper class with helper functions for BoolOp nodes
 * 
 * Note: It is possible to have a BoolOp with 1 operand, but then the op becomes a nop.*/
public class LapBoolOp extends LapExpression {
	public final VetoableProperty<boolopType> op = new VetoableProperty<>(boolopType.class);
	public final ChildList<LapExpression> values = new ChildList<>(this, LapExpression.class, false);
	
	public LapBoolOp(PyAST pyAST, ChildField<? super LapBoolOp> parent, BoolOp node) throws PropertyVetoException {
		super(pyAST, parent, node);
		op.setInternal(node.getInternalOp());
		ASTHelperFactory.makeHelpers(pyAST, values, node.getInternalValues());
		buildTextNodes(node);
	}
}
